<template>
	<view class="root">
		<img-slide :imgArr="imgArr" :bgc="bgc"></img-slide>
		<old-detail :lv="lv" :info="info" @changeChoice="change"></old-detail>
	</view>
</template>

<script>
	import imgSlide from "../../../components/ui/tg-img-slide.vue"
	import oldDetail from '@/components/ui/page/out-record-from.vue'
	export default {
		components: {

			imgSlide,
			oldDetail
		},
		data() {
			return {
				bgc: '#33B0FF',
				imgArr: [],
				info:{},
				lv:''
			}
		},
		onLoad(e) {
			console.log(e.item)
			var data = JSON.parse(e.item);
			this.lv = e.lv
			console.log(data)
			var pd = data.procData
			this.info = data
			// this.info = {
			// 	name:`关婉`,
			// 	gender:`女`,
			// 	idCard:`341126199009017722`,
			// 	phone:`176888254778`,
			// 	nation:`汉族`,
			// 	immigrationName:`古河镇政府`,
			// 	huji:`安徽省滁州市天长市`,
			// 	immigrationTime:`2020-10-25 14:25:37`,
			// 	immiProvince:`是`
			// }
			// console.log(this.info)
			this.imgArr = [{
				url: data.imgUrl,
				name: '户口本照片'
			}]

		},
		methods: {
			change(e) {
				console.log(e)
				if (e.index == 0) {
					this.bgc = '#33B0FF'
				} else {
					this.bgc = '#FF6B6B'
				}
				console.log(this.bgc)
			}
		}
	}
</script>

<style scoped>
	.root::after {
		content: "";
		width: 700rpx;
		height: 100rpx;
		display: block;
	}
</style>
